<script setup>
import { onMounted, onBeforeMount } from 'vue'
defineOptions({
  name: 'Test'
})
const model = defineModel()
const content = defineModel('content')
onMounted(() => {
  console.log('child - mounted')
})
const change = () => {
  content.value = 'hello world'
}
onBeforeMount(() => {
  console.log('child - onBeforeMount')
})
</script>
<template>
  我是子组件{{ model }}{{ content }}
  <el-button @click="change">改变</el-button>
</template>
<style scoped lang="scss"></style>
